package cn.hxzy.mapper;

import cn.hxzy.pojo.Proinfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author songmengxin
 * @since 2021-07-31
 */
@Repository
public interface ProinfoMapper extends BaseMapper<Proinfo> {

    @Select("SELECT * FROM proinfo where proId=#{proId}")
    @Results({
            @Result(property = "user",column ="userId",one =@One(select="cn.hxzy.mapper.UserMapper.getUserById"))
    })
    Proinfo getProinfoById(String proId);

}
